﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace LCA.Community.DAL.Model
{
    /// <summary>
    /// This is the basic model that has to be inherited by the rest of the storage models.
    /// </summary>
    public class BasicStorageModel
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BasicStorageModel"/> class.
        /// </summary>
        public BasicStorageModel()
        {

        }

        /// <summary>
        /// Equalses the specified obj.
        /// </summary>
        /// <param name="obj">The obj.</param>
        /// <returns><c>true</c> if both objects are equals; otherwise, <c>false</c>.</returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var u = obj as BasicStorageModel;
            if ((System.Object)u == null)
            {
                return false;
            }

            return Name.Equals(u.Name);
        }

        /// <summary>
        /// Gets the hash code.
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        public string Name { get; set; }
        /// <summary>
        /// Gets or sets the URL.
        /// </summary>
        /// <value>
        /// The URL.
        /// </value>
        public Uri Url { get; set; }
        /// <summary>
        /// Gets or sets the content tpye.
        /// </summary>
        /// <value>
        /// The content tpye.
        /// </value>
        public string ContentType { get; set; }
        /// <summary>
        /// Gets or sets the stream.
        /// </summary>
        /// <value>
        /// The stream.
        /// </value>
        public Stream Stream { get; set; }
        /// <summary>
        /// Gets or sets the container.
        /// </summary>
        /// <value>
        /// The container.
        /// </value>
        public string Container { get; set; }
    }
}
